#include "process.h"

//函数定义
void ProncessOn()
{
  int i = 0;
  char array[NUM];
  memset(array, '\0', sizeof(array));

  const char* label = "|/-\\";
  char style[4] = {'#', '+', '-', '*'};

  while(i <= 100)
  {
    printf("[%-100s][%d%%][%c]\r", array, i, label[i%4]);
    fflush(stdout);
    array[i++] = style[N];
    //sleep(1);//按秒，太慢了
    usleep(50000);//微秒 1/100,0000
  }
  
  printf("\n");
}
